<?php head(array('title' => item('Dublin Core', 'Title'), 'bodyid'=>'items','bodyclass' => 'show'));?>

<div id="secondary">
	<?php echo secondary_poincare();?>
</div>

<div id="primary">
	<div class="backToTheList"><a href="<?php echo(html_escape($_SERVER['HTTP_REFERER']))?>">Retour à la liste</a></div>
	<!-- The following returns all of the files associated with an item. -->
	<div id="itemfiles" class="element">
	    <h5><?php echo item('Dublin Core', 'Title') ?></h5>
	    <div class="element-text">
	    	<?php echo display_files_for_item_poincare(array('imageSize' => 'fullsize', 'icons'=>array('application/pdf'=>WEB_ROOT.'/themes/poincare/images/pdf.gif')));
	    	//, 'icons'=>array('application/pdf'=>WEB_ROOT.'/themes/poincare/images/pdf.gif'?>
	    </div>
	    <div style="clear:both;"/>
	</div>
	<h5>Classement dans l'archive</h5>
	<table class="meta-table">
		<?php if ($itemTypeName = item('Item Type Name')): ?>
		<tr><td class="meta-name">Type de contenu:</td><td class="meta-value"><a href="../browse?type=<?php echo $item->item_type_id ?>"><?php echo $itemTypeName; ?></a></td></tr>
		<?php endif;?>
		<?php if (item_belongs_to_collection()): ?>
		<tr><td class="meta-name"><?php echo __('Collection'); ?>:</td><td class="meta-value">
			<a href="<?php echo html_escape(WEB_ROOT)?>/items/browse?collection=<?php print_r($item->collection_id);?>"><?php echo (get_collection_for_item()->name);?></a>
		</td></tr>
		<?php endif; ?>
		<?php if (item_has_tags()): ?>
		<tr><td class="meta-name">Mot(s)-clé(s):</td><td class="meta-value"><?php echo item_tags_as_string(); ?></td></tr>
		<?php endif; ?>
	</table>
	<div class="element-set">
		<h5>Notice détaillée</h5>
		<table class="meta-table">
		<?php
		// in custom.php and /items/item-metadata.php
		echo custom_show_item_metadata_poincare(); ?>
		</table>
	</div><!-- end element-set -->

	<?php echo '<h5>Document et fichiers</h5>';?>
	<table class="meta-table">
		<tr><td class="meta-name">Dates du document:</td><td class="meta-value">création: <?php echo item('date added'); ?>; modification: <?php echo item('date modified'); ?></td></tr>
		<?php
		/* Récupérer des données sur les fichiers*/
		if(item_has_files()):
			while(loop_files_for_item()):
				echo '<tr>';
				$file = get_current_file();
				echo '<td class="meta-name">'.$file->original_filename.'</td>';
				echo '<td class="meta-value">';
		    if ($rights=item_file('Dublin Core', 'Rights')) echo 'Droits: '.$rights.'; ';
				echo $file->size.' Octets; ';
				echo $file->type_os.';<br/>';
				echo 'ajouté: '.$file->added.'</td>';
				echo '</tr>';
			endwhile;
		?>
		<?php endif;?>

	</table>
	<!-- The following prints a citation for this item. -->
	<div id="item-citation" class="element">
	    <h5><?php echo __('Citation'); ?></h5>
	    <table class="meta-table"><tr><td class="meta-value"><?php echo item_citation_poincare(); ?></td></tr></table>
	</div>

	<?php echo plugin_append_to_items_show(); ?>


</div><!-- end primary -->
<?php foot(); ?>
